﻿using Factory;
using IDAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class B_Category : ICategory
    {
        public void Add(Category item)
        {
            CreateFactory.GetCategory().Add(item);
        }

        public void Delete(int id)
        {
            CreateFactory.GetCategory().Delete(id);
        }

        public Category FindById(int id)
        {
            return CreateFactory.GetCategory().FindById(id);
        }

        public List<Category> GetAll()
        {
            return CreateFactory.GetCategory().GetAll();
        }

        public void Updata(int id, Category item)
        {
            CreateFactory.GetCategory().Updata(id, item);
        }
    }
}
